<style>
    body {
        background-color: #ffffff;
    }

    .layui-iconpicker-body.layui-iconpicker-body-page .hide {
        display: none;
    }
</style>

<div class="layui-form layuimini-form">

    <div class="layui-form-item">
        <label class="layui-form-label required">登陆账号</label>
        <div class="layui-input-block">
            <input type="text" autocomplete="off" name="username" class="layui-input" lay-verify="required"
                   lay-reqtext="请输入登陆账号"
                   placeholder="请输入登陆账号" value="">
            <tip>填写登陆账号，不能与其他登陆账号名重复，不能出现中文，填写后不允许修改</tip>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">手机</label>
        <div class="layui-input-block">
            <input type="text" autocomplete="off" name="mobile" class="layui-input"
                   placeholder="请输入手机" value="">
            <tip>填写11位手机号</tip>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block">
            <input type="text" autocomplete="off" name="email" class="layui-input"
                   placeholder="请输入邮箱" value="">
            <tip>填写邮箱</tip>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">角色权限</label>
        <div class="layui-input-block">
            {foreach :role_enable_list() as $key=>$val}
            <input type="checkbox" name="role_ids[{$key}]" lay-skin="primary" title="{$val}">
            {/foreach}
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">备注信息</label>
        <div class="layui-input-block">
            <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息"></textarea>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <select name="status" lay-filter="status">
                <option value="0">无效</option>
                <option value="1" selected="">有效</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>
</div>
<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.$;
        form.on('submit(saveBtn)', function (data) {
            var post_data = data.field;
            postData("{:url('admin/add')}", post_data, '新增成功');
            return false;
        });
    });
</script>